package cn.com.pc.content.dto;

import cn.com.pc.content.domain.post.Post;
import cn.com.pc.content.domain.post.Topic;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.beans.BeanUtils;

import javax.validation.constraints.NotNull;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@ToString(callSuper = true)
public class PostDTO extends ContentDTO{

    public static PostDTO from(Post post) {
        PostDTO postDTO = new PostDTO();
        BeanUtils.copyProperties(post, postDTO);
        return postDTO;
    }
}
